/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author jose
 */
import java.util.Vector;
public class Pila <E> implements Stack {
    
    private Vector <E> pila;
    
    public Pila(){
        pila=new Vector();
    }
    @Override
    public void push(E item){
        pila.add(item);
    }
    @Override
    public E pop(){
        return pila.remove(pila.size() -1);
    }
    @Override
    public E peek(){
        return pila.lastElement();
    }
    @Override
    public int size(){
        return pila.size();
    }
    @Override
    public boolean empty(){
        return pila.isEmpty();
    }
}
